package com.zzl.bonds.ticket.constant;

/**
 * @author : spp
 * @date : 2021/12/7 13:12
 */
public enum CreditDataStatusEnum {

    /**
     * 最新数据
     */
    LATEST(1, "最新数据"),

    /**
     * 历史数据
     */
    HISTORY(0, "历史数据");

    private Integer code;
    private String value;


    CreditDataStatusEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(Integer code) {
        for (CreditDataStatusEnum statusEnum : CreditDataStatusEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
